import request from '@/utils/request.js'

/**
 * @param {Object} data - 登录所需要的用户名称密码
 */
export const loginApi = (data) => {
	return request.post('/driver/login/account', data)
}

/**
 * 用户个人信息
 */
export const profileApi = () => {
	return request.get('/driver/users')
}

/**
 * 任务数据
 * @param {string} year - 任务数据的年份
 * @param {string} month - 任务数据的月份
 */
export const taskApi = (year, month) => {
	return request.get('/driver/users/taskReport', null, {
		params: { year, month }
	})
}
/**
 * 车辆信息
 */
export const truckApi = () => {
	return request.get('/driver/users/truck')
}